-- http://ask.touchelf.net/docs/touchelf_ui
function main()
  wd = script.workingDir()
  --截图用作动态UI里面显示
  screen.snapshot("/var/touchelf/a.png", 100, 100, 200, 200)
  res = sys.ui.show(wd .. "/res/input.html",100,100,500,500)
  --返回数据{"type":"ok","data":{"input":"touchelf"}}
  res = codec.json.decode(res)
  if res.type == "ok" then
    --脚本继续
    sys.log(res.data.input)
  elseif res.type == "cancel" then
    --脚本停止
    script.stop();
  end
end